home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 0193.ZIP / STD-ATTR.INC < prev    next >
Text File  |  1986-01-08  |  2KB  |  62 lines

  1. { CDS-ATTR.INC  Video attribute control routines system. }
  2.  
  3.  
  4. const  REVERSE_VID : Byte = $1F;  { Reverse video attribute }
  5.                                   { Intense White on Blue }
  6.        BRIGHT_VID  : Byte = $70;  { Normal video attribute }
  7.                                   { Black on Grey. }
  8.        DIM_VID     : Byte = $71;  { Low video attribute }
  9.                                   { Blue on Grey. }
  10.        BLINK_VID   : Byte = $F1;  { Blinking Video attribute }
  11.                                   { Blinking Blue on Grey. }
  12.        BLINK_FGND  : Byte = $1F;
  13.  
  14.        NORM_BGND   : Integer = WHITE;
  15.        REV_BGND    : Integer = BLUE;
  16.        NORM_FGND   : Integer = BLACK;
  17.        DIM_FGND    : Integer = BLUE;
  18.        BORDER      : Integer = CYAN;
  19.  
  20.        SCR_EXT     : string[4] = '.TSC'; { File exetension for color screens.}
  21.  
  22. var    first_var : Integer;  { Marks start of global variables. }
  23.        vid_attr  : Byte;
  24.  
  25.   procedure Norm_Video;
  26.     begin
  27.       vid_attr := BRIGHT_VID;
  28.       TextColor(NORM_FGND); TextBackground(NORM_BGND);
  29.     end; { Norm_Video }
  30.  
  31.   procedure Low_Video;
  32.     begin
  33.       vid_attr := DIM_VID;
  34.       TextColor(DIM_FGND); TextBackground(NORM_BGND);
  35.     end; { Low_Video }
  36.  
  37.   procedure Blink_Video;
  38.     begin
  39.       vid_attr := BLINK_VID;
  40.       TextColor(BLINK_FGND); TextBackground(REV_BGND);
  41.     end { Blink_Video };
  42.  
  43.   procedure Rev_Video;
  44.     begin
  45.       vid_attr := REVERSE_VID;
  46.       TextColor(NORM_BGND); TextBackground(REV_BGND);
  47.     end { Rev_Video };
  48.  
  49.   function  Mono_Monitor: Boolean;
  50.     var  video_type : Byte;
  51.  
  52.     begin
  53.       video_type := (Mem[$0000:$0410] and $30);
  54.       case video_type of
  55.         $20 : Mono_Monitor := FALSE;
  56.         $30 : Mono_Monitor := TRUE;
  57.         else  begin
  58.                 WriteLn(#7);
  59.               end;
  60.      end; {case}
  61.     end; { Mono_Monitor }
  62.